<?php
/**
 * Created by PhpStorm.
 * User: Lee
 * Date: 2021/7/1
 */
namespace App\Services\Backend\System;

use App\Common\Exception\ErrorException;

/**
 * 专家管理 (服务)
 */
class SysparaService
{
    /** @var \App\Repositories\Backend\System\SysparaRepository $sysparaRepository */
    private $sysparaRepository;

    public function __construct()
    {
        $this->sysparaRepository = app('sysparaRepository');
    }

    //*******************外部调用方法****************************************************
    public function getCore($id, $keyName = 'id',$columns = ['*']){
        return $this->sysparaRepository->get($id,$keyName,$columns);
    }

    public function getAllCore($filters=[], $sorts =[], $columns=['*']){
        return $this->sysparaRepository->getAll($filters,$sorts,$columns);
    }

    public function editCore($data,$id,$keyName='id'){
        return $this->sysparaRepository->edit($data,$id,$keyName);
    }

}
